package Deom5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2023-11-19
 * Time: 21:23
 */
public class Animal {
    public String name;
    public int age;
    public Animal(String name) {
        System.out.println("父类有参的构造方法");
    }
}
class Dog extends Animal {
    public String color;

    public Dog(String name) {
        super(name);
        System.out.println("子类的有参构造方法");
    }

    public static void main(String[] args) {
        Dog dog = new Dog("小黄");

    }
}
